package com.atguigu.spzx.manager.properties;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * title:
 * author: zgl
 * date: 2023/12/29
 * description：
 */
@Data
@ConfigurationProperties(prefix = "spzx.minio")
@Configuration
public class SpzxMinioProperties implements InitializingBean {
    private String endpoint;
    private String accessKey;
    private String secretKey;
    private String bucketName;


    public static String ENDPOINT;
    public static String ACCESS_KEY;
    public static String SECRET_KEY;
    public static String BUCKET_NAME;


    @Override
    public void afterPropertiesSet() throws Exception {
        ENDPOINT = this.endpoint;
        ACCESS_KEY = this.accessKey;
        SECRET_KEY = this.secretKey;
        BUCKET_NAME = this.bucketName;
    }
}
